package com.example.fushuang.balabala.activities;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;

import com.example.fushuang.balabala.R;
import com.example.fushuang.balabala.model.RecommendEntry;
import com.umeng.analytics.MobclickAgent;

public class WebLinkActivity extends AppCompatActivity {

    private WebView mWebView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_link);
        mWebView = (WebView) findViewById(R.id.webLink_webView);
        RecommendEntry.ResultBean.BodyBean bodyItem=getIntent().getParcelableExtra("bodyItem");
        String param = bodyItem.getParam();
        mWebView.loadUrl(param);
    }

    @Override
    protected void onResume() {
        super.onResume();
        MobclickAgent.onResume(this);
        MobclickAgent.onPageStart("webLink");
    }

    @Override
    protected void onPause() {
        super.onPause();
        MobclickAgent.onResume(this);
        MobclickAgent.onPageEnd("webLink");
    }
}
